<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>原型链，工厂模式</title>
</head>
<body>
    

    <script type="text/javascript">
        function cPerson(name,qq) {
            this.name = name;
            this.qq = qq;
        }
        cPerson.prototype.showName = function () {
            console.log("姓名是："+ this.name);
        }
        cPerson.prototype.showqq = function () {
            console.log("姓名是："+ this.qq);
        }
        var obj1 = new cPerson("王三","333");
        obj1.showName();
        obj1.showqq();
        var obj2 = new cPerson("李四","444");
        obj2.showName();
        obj2.showqq();
        

        console.log(obj1.showName === obj2.showName);

         
    </script>
</body>
</html>